package com.polaris.live.dialog

import android.content.Context
import com.lxj.xpopup.core.CenterPopupView
import com.polaris.live.R
import com.polaris.live.common.ext.setOnSingleClickListener
import com.polaris.live.databinding.DialogGameRuleBinding

/**
 * GameRuleDialog
 *
 * @author Created by 半仙 on 2024/3/19/019 16:46
 */
class GameRuleDialog(
    context: Context,
    private val mDetail: String,
) : CenterPopupView(context) {
    override fun getImplLayoutId() = R.layout.dialog_game_rule

    private lateinit var mBinding: DialogGameRuleBinding

    override fun onCreate() {
        super.onCreate()
        mBinding = DialogGameRuleBinding.bind(popupImplView)
        mBinding.tvGameRuleDetail.text = mDetail
        mBinding.ivClose.setOnSingleClickListener {
            dismiss()
        }
    }
}